package com.iplay.vo.order.query;

import java.util.Arrays;
import java.util.List;

import com.iplay.entity.order.ApprovalStatus;
import com.iplay.entity.order.OrderStatus;
import com.iplay.service.order.query.CustomerQueryConditionBuilder;
import com.iplay.service.order.query.ManagerQueryConditionBuilder;
import com.iplay.service.order.query.RecommenderQueryConditionBuilder;
import com.iplay.service.order.query.HotelQueryConditionBuilder;
import com.iplay.service.order.query.BanquetHallQueryConditionBuilder;
import com.iplay.service.query.QueryCondition.Operator;
import com.iplay.service.query.annotation.QueryCondition;

public class OrderQueryVO {
	@QueryCondition(value = "orderTime", operator = Operator.GE)
	private Long orderTimeFrom;
	@QueryCondition(value = "orderTime", operator = Operator.LE)
	private Long orderTimeTo;
	@QueryCondition(operator = Operator.IN)
	private List<OrderStatus> orderStatus;
	@QueryCondition("contractApprovalStatus")
	private ApprovalStatus orderContractStatus;
	@QueryCondition("paymentApprovalStatus")
	private ApprovalStatus orderPaymentStatus;

	private Long orderNumber;
	@QueryCondition(builder = CustomerQueryConditionBuilder.class)
	private String customer;
	@QueryCondition(builder = ManagerQueryConditionBuilder.class)
	private String manager;
	@QueryCondition(builder = RecommenderQueryConditionBuilder.class)
	private String recommender;
	private String contact;
	@QueryCondition(builder = HotelQueryConditionBuilder.class)
	private String hotel;
	@QueryCondition(builder = BanquetHallQueryConditionBuilder.class)
	private String banquetHall;

	public OrderQueryVO() {
	}

	public OrderQueryVO(Long orderTimeFrom, Long orderTimeTo, OrderStatus[] orderStatus, Long orderNumber,
			ApprovalStatus orderContractStatus, ApprovalStatus orderPaymentStatus, String customer, String manager,
			String recommender, String contact, String hotel, String banquetHall) {
		super();
		this.orderTimeFrom = orderTimeFrom;
		this.orderTimeTo = orderTimeTo;
		this.orderStatus = orderStatus == null ? null : Arrays.asList(orderStatus);
		this.orderContractStatus = orderContractStatus;
		this.orderPaymentStatus = orderPaymentStatus;
		this.orderNumber = orderNumber;
		this.customer = customer;
		this.manager = manager;
		this.recommender = recommender;
		this.contact = contact;
		this.hotel = hotel;
		this.banquetHall = banquetHall;
	}

	public Long getOrderTimeFrom() {
		return orderTimeFrom;
	}

	public void setOrderTimeFrom(Long orderTimeFrom) {
		this.orderTimeFrom = orderTimeFrom;
	}

	public Long getOrderTimeTo() {
		return orderTimeTo;
	}

	public void setOrderTimeTo(Long orderTimeTo) {
		this.orderTimeTo = orderTimeTo;
	}

	public List<OrderStatus> getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(List<OrderStatus> orderStatus) {
		this.orderStatus = orderStatus;
	}

	public ApprovalStatus getOrderContractStatus() {
		return orderContractStatus;
	}

	public void setOrderContractStatus(ApprovalStatus orderContractStatus) {
		this.orderContractStatus = orderContractStatus;
	}

	public ApprovalStatus getOrderPaymentStatus() {
		return orderPaymentStatus;
	}

	public void setOrderPaymentStatus(ApprovalStatus orderPaymentStatus) {
		this.orderPaymentStatus = orderPaymentStatus;
	}

	public Long getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(Long orderNumber) {
		this.orderNumber = orderNumber;
	}

	public String getCustomer() {
		return customer;
	}

	public void setCustomer(String customer) {
		this.customer = customer;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getRecommender() {
		return recommender;
	}

	public void setRecommender(String recommender) {
		this.recommender = recommender;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getHotel() {
		return hotel;
	}

	public void setHotel(String hotel) {
		this.hotel = hotel;
	}

	public String getBanquetHall() {
		return banquetHall;
	}

	public void setBanquetHall(String banquetHall) {
		this.banquetHall = banquetHall;
	}
}
